import './assets/main.css'

import {createApp} from 'vue'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import './assets/css/global.css' // 引入全局样式
import axios from 'axios';
import {http} from '../api/axios.js'
import emitter from './event/EventBus.js'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);

// if(isMobile){
//     window.location.href = 'https://mobile.zxsjtools.cn'
// }

const app = createApp(App)

app.use(router)
app.config.globalProperties.$axios = axios;
app.config.globalProperties.$http = http;
app.config.globalProperties.http = http;
app.config.globalProperties.$emitter = emitter;
app.use(ElementPlus)


for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.mount('#app')

